// pages/mine/setting/about_us.js
var App = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    titleImg:'../../../images/logo_img.png',
    titleText:'',
    content:'',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.showLoading({
      title: '加载中',
    })
    let that = this;
    wx.request({
      url: App.data.globalAPI + '/setting/about/get',
      data: {
        token: wx.getStorageSync('token')
      },
      header: {
        'content-type': 'application/json' // 默认值
      },
      success(res) {
        wx.hideLoading();
        if (res.data.error == 0) {
          let msg = res.data.data;
          that.setData({
            titleText:msg.length==0?'':msg.title,
            content: msg.length==0?'':msg.desc
          })

        }
        else{
          wx.showToast({
            title: res.data.msg,
            icon:'none',
            duration:600
          })
        }
      }
    })
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  //back
  backLastPage: function () {
    wx.navigateBack({
      delta: 1
    })
  },
})